import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import tushare as ts
from utils.confutils import ConfUtil
import datetime
# 提取token
token = ConfUtil().get_tokens('tushare')
pro = ts.pro_api(token)
# 下载停牌数据
today_str = datetime.datetime.now().strftime('%Y%m%d')
df = pro.suspend_d(start_date='20100101',end_date=today_str)
# 存到..\Data\RawData\stock_suspend.feather文件中
tofile = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + "\\Data\\RawData\\stock_suspend.feather"
df.to_feather(tofile)